package com.xinhe.web.enums;

import java.math.BigDecimal;
import java.math.RoundingMode;

public enum EAssetType implements IAssetType {
    RMB("人民币", Boolean.TRUE),
    YUN_CHA_SEED("云茶籽", Boolean.TRUE),
    NEW_YUN_CHA_SEED("云茶籽", Boolean.TRUE),
    TEA_OIL_CARD("茶油卡", Boolean.TRUE),
    CONSUMER_GOLD_RED_ENVELOPE("消费金红包", Boolean.TRUE),
    UNFREEZING_CONSUMER_GOLD_RED_ENVELOPE("解冻消费金红包", Boolean.TRUE),
    TEA_OIL("茶油", Boolean.TRUE);
    static {
        RMB.unit = "元";
    }
    private Boolean payAble = Boolean.FALSE;
    private BigDecimal tradeAmountMin = BigDecimal.ZERO;

    private BigDecimal remainderMin = BigDecimal.ZERO;

    private BigDecimal frozenMin = BigDecimal.ZERO;

    private BigDecimal availableMin = BigDecimal.ZERO;
    private String label;
    private Integer scale;
    private RoundingMode roundingMode;
    private String unit;

    EAssetType(String label) {
        this.label = label;
    }

    private BigDecimal tradeAmountMax;
    private BigDecimal remainderMax;
    private BigDecimal frozenMax;
    private BigDecimal availableMax;

    EAssetType(String label, Boolean payAble) {
        this.label = label;
        this.payAble = payAble;
    }

    EAssetType(String label, BigDecimal remainderMin) {
        this.label = label;
        this.remainderMin = remainderMin;
    }


    EAssetType(String label, Boolean payAble, BigDecimal remainderMin) {
        this.label = label;
        this.payAble = payAble;
        this.remainderMin = remainderMin;
    }

    EAssetType(String label, BigDecimal remainderMin, BigDecimal remainderMax) {
        this.label = label;
        this.remainderMin = remainderMin;
        this.remainderMax = remainderMax;
    }


    EAssetType(String label, BigDecimal remainderMin, BigDecimal remainderMax, BigDecimal frozenMin, BigDecimal frozenMax) {
        this.label = label;
        this.remainderMin = remainderMin;
        this.remainderMax = remainderMax;
        this.frozenMin = frozenMin;
        this.frozenMax = frozenMax;
    }


    EAssetType(String label, BigDecimal remainderMin, BigDecimal remainderMax, BigDecimal frozenMin, BigDecimal frozenMax, BigDecimal availableMin, BigDecimal availableMax) {
        this.label = label;
        this.remainderMin = remainderMin;
        this.remainderMax = remainderMax;
        this.frozenMin = frozenMin;
        this.frozenMax = frozenMax;
        this.availableMin = availableMin;
        this.availableMax = availableMax;
    }


    public String getLabel() {
        return this.label;
    }

    public Boolean getPayAble() {
        return this.payAble;
    }


    public Integer getScale() {
        return this.scale;
    }


    public String getUnit() {
        return this.unit;
    }


    public RoundingMode getRoundingModel() {
        return this.roundingMode;
    }


    public String getName() {
        return name();
    }


    public String getGroup() {
        return getClass().getSimpleName();
    }


    public BigDecimal getRemainderMin() {
        return this.remainderMin;
    }


    public BigDecimal getRemainderMax() {
        return this.remainderMax;
    }


    public BigDecimal getFrozenMin() {
        return this.frozenMin;
    }


    public BigDecimal getFrozenMax() {
        return this.frozenMax;
    }


    public BigDecimal getAvailableMin() {
        return this.availableMin;
    }


    public BigDecimal getAvailableMax() {
        return this.availableMax;
    }


    public BigDecimal getTradeAmountMin() {
        return this.tradeAmountMin;
    }

    public BigDecimal getTradeAmountMax() {
        return this.tradeAmountMax;
    }

    /*public String toString() {
        JSONObject json = new JSONObject();
        json.accumulate("payAble", this.payAble);
        json.accumulate("unit", this.unit);
        return json.toString();
    }*/

}